package com.ssy.lingxi.order.handler.annotation;

import com.ssy.lingxi.order.handler.validator.OrderPayTypeValidator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;


/**
 * 订单支付方式校验注解
 * @author 万宁
 * @version 2.0.0
 * @date 2021-07-15
 */
@Target({ElementType.TYPE, ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Constraint(validatedBy = OrderPayTypeValidator.class)
public @interface OrderPayTypeAnnotation {
    String message() default "支付方式不在枚举定义范围内";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
